//
//  BrandsViewController.m
//  UI_A段项目_iDaily Watch
//
//  Created by lianglide on 14-10-14.
//  Copyright (c) 2014年 蓝欧科技. All rights reserved.
//

#import "BrandsViewController.h"
#import "AFHTTPRequestOperationManager.h"
#import "BrandsModel.h"
#import "Brandsbr1ViewController.h"

@interface BrandsViewController ()

@end

@implementation BrandsViewController

- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
    self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
    if (self) {
        // Custom initialization
        _array2 = [NSMutableArray array];
      
    }
    return self;
}

- (void)viewDidLoad
{
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    //self.navigationController.navigationBar.hidden = YES;
    self.navigationController.navigationBar.barTintColor = [UIColor blackColor];
    self.navigationController.navigationBar.translucent = NO;
    
    _scroll1 = [[UIScrollView alloc]initWithFrame:CGRectMake(0, 0, 320, 568 - 64)];
    _scroll1.delegate = self;
    _scroll1.contentSize = CGSizeMake(320 * 2, 568 - 64);
    //_scroll1.backgroundColor = [UIColor orangeColor];
    [_scroll1 setBackgroundColor:[UIColor colorWithPatternImage:[UIImage imageNamed:@"99.jpg"]]];
    
    
    [self.view addSubview:_scroll1];
    
    _aView = [[UIView alloc]initWithFrame:CGRectMake(80, 5, 520, 345)];
    
    _aView.backgroundColor = [UIColor clearColor];
    _aView.layer.transform = CATransform3DMakeRotation(0, 0, 0, 0);
    [_scroll1 addSubview:_aView];
    _button1 = [UIButton buttonWithType:UIButtonTypeRoundedRect];
    _button1.alpha = 0.4;
    _button1.frame = CGRectMake(60 , 35, 100, 100);
    [_button1 addTarget:self action:@selector(buttonAction:) forControlEvents:UIControlEventTouchUpInside];
    [_button1 setTitle:@"Apple" forState:UIControlStateNormal];
    _button1.backgroundColor = [UIColor whiteColor];
    _button1.tintColor = [UIColor blueColor];
    [_button1.titleLabel setFont:[UIFont systemFontOfSize:30]];
    [_aView addSubview:_button1];
    
    _button2 = [UIButton buttonWithType:UIButtonTypeRoundedRect];
    _button2.alpha = 0.4;
    _button2.frame = CGRectMake(165, 35, 45, 45);
    [_button2 addTarget:self action:@selector(buttonAction:) forControlEvents:UIControlEventTouchUpInside];
    [_button2 setTitle:@"Banana" forState:UIControlStateNormal];
    _button2.tintColor = [UIColor magentaColor];
    [_button2.titleLabel setFont:[UIFont systemFontOfSize:12]];
    _button2.backgroundColor = [UIColor whiteColor];
    [_aView addSubview:_button2];
    
    _button3 = [UIButton buttonWithType:UIButtonTypeRoundedRect];
    _button3.alpha = 0.4;
    _button3.frame = CGRectMake(215, 35, 45, 45);
    [_button3 addTarget:self action:@selector(buttonAction:) forControlEvents:UIControlEventTouchUpInside];
    [_button3 setTitle:@"Cocoa" forState:UIControlStateNormal];
    _button3.tintColor = [UIColor redColor];
    [_button3.titleLabel setFont:[UIFont systemFontOfSize:12]];
    _button3.backgroundColor = [UIColor whiteColor];
    [_aView addSubview:_button3];
    
    _button4 = [UIButton buttonWithType:UIButtonTypeRoundedRect];
    _button4.alpha = 0.4;
    _button4.frame = CGRectMake(165, 85, 45, 45);
    [_button4 addTarget:self action:@selector(buttonAction:) forControlEvents:UIControlEventTouchUpInside];
    _button4.tintColor = [UIColor grayColor];
    [_button4.titleLabel setFont:[UIFont systemFontOfSize:12]];
    [_button4 setTitle:@"Duck" forState:UIControlStateNormal];
    _button4.backgroundColor = [UIColor whiteColor];
    [_aView addSubview:_button4];
    
    _button5 = [UIButton buttonWithType:UIButtonTypeRoundedRect];
    _button5.alpha = 0.4;
    _button5.frame = CGRectMake(215, 85, 45, 45);
    [_button5 addTarget:self action:@selector(buttonAction:) forControlEvents:UIControlEventTouchUpInside];
    _button5.tintColor = [UIColor redColor];
    [_button5.titleLabel setFont:[UIFont systemFontOfSize:12]];
    [_button5 setTitle:@"Earth" forState:UIControlStateNormal];
    _button5.backgroundColor = [UIColor whiteColor];
    [_aView addSubview:_button5];
    
    _button6 = [UIButton buttonWithType:UIButtonTypeRoundedRect];
    _button6.alpha = 0.4;
    _button6.frame = CGRectMake(265, 35, 200, 100);
    [_button6 addTarget:self action:@selector(buttonAction:) forControlEvents:UIControlEventTouchUpInside];
    _button6.tintColor = [UIColor greenColor];

    [_button6.titleLabel setFont:[UIFont systemFontOfSize:60]];
    [_button6 setTitle:@"Fuck" forState:UIControlStateNormal];
    _button6.backgroundColor = [UIColor whiteColor];
    [_aView addSubview:_button6];
    
    _button7 = [UIButton buttonWithType:UIButtonTypeRoundedRect];
    _button7.alpha = 0.4;
    _button7.frame = CGRectMake(470, 35, 100, 100);
    [_button7 addTarget:self action:@selector(buttonAction:) forControlEvents:UIControlEventTouchUpInside];
    _button7.tintColor = [UIColor redColor];
    [_button7.titleLabel setFont:[UIFont systemFontOfSize:30]];
    [_button7 setTitle:@"Great" forState:UIControlStateNormal];
    _button7.backgroundColor = [UIColor whiteColor];
    [_aView addSubview:_button7];
    
    _button8 = [UIButton buttonWithType:UIButtonTypeRoundedRect];
    _button8.alpha = 0.4;
    _button8.frame = CGRectMake(60, 140, 200, 100);
    [_button8 addTarget:self action:@selector(buttonAction:) forControlEvents:UIControlEventTouchUpInside];
    _button8.tintColor = [UIColor redColor];
    [_button8.titleLabel setFont:[UIFont systemFontOfSize:60]];
    [_button8 setTitle:@"Hero" forState:UIControlStateNormal];
    _button8.backgroundColor = [UIColor whiteColor];
    [_aView addSubview:_button8];
    
    _button9 = [UIButton buttonWithType:UIButtonTypeRoundedRect];
    _button9.alpha = 0.4;
    _button9.frame = CGRectMake(265, 140, 45, 100);
    [_button9 addTarget:self action:@selector(buttonAction:) forControlEvents:UIControlEventTouchUpInside];
    _button9.tintColor = [UIColor redColor];
    [_button9.titleLabel setFont:[UIFont systemFontOfSize:12]];
    [_button9 setTitle:@"Idea" forState:UIControlStateNormal];
    _button9.backgroundColor = [UIColor whiteColor];
    [_aView addSubview:_button9];
    
    _button10 = [UIButton buttonWithType:UIButtonTypeRoundedRect];
    _button10.alpha = 0.4;
    _button10.frame = CGRectMake(315, 140, 45, 100);
    [_button10 addTarget:self action:@selector(buttonAction:) forControlEvents:UIControlEventTouchUpInside];
    _button10.tintColor = [UIColor blueColor];
    [_button10.titleLabel setFont:[UIFont systemFontOfSize:12]];
    [_button10 setTitle:@"Job" forState:UIControlStateNormal];
    _button10.backgroundColor = [UIColor whiteColor];
    [_aView addSubview:_button10];
    
    _button11 = [UIButton buttonWithType:UIButtonTypeRoundedRect];
    _button11.alpha = 0.4;
    _button11.frame = CGRectMake(365, 140, 45, 45);
    [_button11 addTarget:self action:@selector(buttonActionNo:) forControlEvents:UIControlEventTouchUpInside];
    _button11.tintColor = [UIColor magentaColor];
    [_button11.titleLabel setFont:[UIFont systemFontOfSize:12]];
    [_button11 setTitle:@"Key" forState:UIControlStateNormal];
    _button11.backgroundColor = [UIColor whiteColor];
    [_aView addSubview:_button11];
    
    _button12 = [UIButton buttonWithType:UIButtonTypeRoundedRect];
    _button12.alpha = 0.4;
    _button12.frame = CGRectMake(415, 140, 45, 45);
    [_button12 addTarget:self action:@selector(buttonAction:) forControlEvents:UIControlEventTouchUpInside];
    _button12.tintColor = [UIColor greenColor];
    [_button12.titleLabel setFont:[UIFont systemFontOfSize:12]];
    [_button12 setTitle:@"Love" forState:UIControlStateNormal];
    _button12.backgroundColor = [UIColor whiteColor];
    [_aView addSubview:_button12];
    
    _button13 = [UIButton buttonWithType:UIButtonTypeRoundedRect];
    _button13.alpha = 0.4;
    _button13.frame = CGRectMake(365, 190, 45, 45);
    [_button13 addTarget:self action:@selector(buttonAction:) forControlEvents:UIControlEventTouchUpInside];
    _button13.tintColor = [UIColor redColor];
    [_button13.titleLabel setFont:[UIFont systemFontOfSize:12]];
    [_button13 setTitle:@"Money" forState:UIControlStateNormal];
    _button13.backgroundColor = [UIColor whiteColor];
    [_aView addSubview:_button13];
    
    _button14 = [UIButton buttonWithType:UIButtonTypeRoundedRect];
    _button14.alpha = 0.4;
    _button14.frame = CGRectMake(415, 190, 45, 45);
    [_button14 addTarget:self action:@selector(buttonAction:) forControlEvents:UIControlEventTouchUpInside];
    _button14.tintColor = [UIColor blueColor];
    [_button14.titleLabel setFont:[UIFont systemFontOfSize:12]];
    [_button14 setTitle:@"Near" forState:UIControlStateNormal];
    _button14.backgroundColor = [UIColor whiteColor];
    [_aView addSubview:_button14];
    
    _button15 = [UIButton buttonWithType:UIButtonTypeRoundedRect];
    _button15.alpha = 0.4;
    _button15.frame = CGRectMake(470, 140, 100, 100);
    [_button15 addTarget:self action:@selector(buttonAction:) forControlEvents:UIControlEventTouchUpInside];
    _button15.tintColor = [UIColor redColor];
    [_button15.titleLabel setFont:[UIFont systemFontOfSize:30]];
    [_button15 setTitle:@"Object" forState:UIControlStateNormal];
    _button15.backgroundColor = [UIColor whiteColor];
    [_aView addSubview:_button15];
    
    _button16 = [UIButton buttonWithType:UIButtonTypeRoundedRect];
    _button16.alpha = 0.4;
    _button16.frame = CGRectMake(60, 250, 45, 45);
    [_button16 addTarget:self action:@selector(buttonAction:) forControlEvents:UIControlEventTouchUpInside];
    _button16.tintColor = [UIColor redColor];
    [_button16.titleLabel setFont:[UIFont systemFontOfSize:12]];
    [_button16 setTitle:@"Power" forState:UIControlStateNormal];
    _button16.backgroundColor = [UIColor whiteColor];
    [_aView addSubview:_button16];
    
    _button17 = [UIButton buttonWithType:UIButtonTypeRoundedRect];
    _button17.alpha = 0.4;
    _button17.frame = CGRectMake(110, 250, 45, 45);
    [_button17 addTarget:self action:@selector(buttonActionNo:) forControlEvents:UIControlEventTouchUpInside];
    _button17.tintColor = [UIColor blueColor];
    [_button17.titleLabel setFont:[UIFont systemFontOfSize:12]];
    [_button17 setTitle:@"Queue" forState:UIControlStateNormal];
    _button17.backgroundColor = [UIColor whiteColor];
    [_aView addSubview:_button17];

    
    _button18 = [UIButton buttonWithType:UIButtonTypeRoundedRect];
    _button18.alpha = 0.4;
    _button18.frame = CGRectMake(60, 305, 45, 45);
    [_button18 addTarget:self action:@selector(buttonAction:) forControlEvents:UIControlEventTouchUpInside];
    _button18.tintColor = [UIColor redColor];
    [_button18.titleLabel setFont:[UIFont systemFontOfSize:12]];
    [_button18 setTitle:@"Rose" forState:UIControlStateNormal];
    _button18.backgroundColor = [UIColor whiteColor];
    [_aView addSubview:_button18];
    
    _button19 = [UIButton buttonWithType:UIButtonTypeRoundedRect];
    _button19.alpha = 0.4;
    _button19.frame = CGRectMake(110, 305, 45, 45);
    [_button19 addTarget:self action:@selector(buttonAction:) forControlEvents:UIControlEventTouchUpInside];
    _button19.tintColor = [UIColor redColor];
    [_button19.titleLabel setFont:[UIFont systemFontOfSize:12]];
    [_button19 setTitle:@"Sun" forState:UIControlStateNormal];
    _button19.backgroundColor = [UIColor whiteColor];
    [_aView addSubview:_button19];

    
    _button20 = [UIButton buttonWithType:UIButtonTypeRoundedRect];
    _button20.alpha = 0.4;
    _button20.frame = CGRectMake(160, 250, 100, 100);
    [_button20 addTarget:self action:@selector(buttonAction:) forControlEvents:UIControlEventTouchUpInside];
    _button20.tintColor = [UIColor redColor];
    [_button20.titleLabel setFont:[UIFont systemFontOfSize:30]];
    [_button20 setTitle:@"Tool" forState:UIControlStateNormal];
    _button20.backgroundColor = [UIColor whiteColor];
    [_aView addSubview:_button20];
    
    _button21 = [UIButton buttonWithType:UIButtonTypeRoundedRect];
    _button21.alpha = 0.4;
    _button21.frame = CGRectMake(265, 250, 100, 45);
    [_button21 addTarget:self action:@selector(buttonAction:) forControlEvents:UIControlEventTouchUpInside];
    _button21.tintColor = [UIColor greenColor];
    [_button21.titleLabel setFont:[UIFont systemFontOfSize:20]];
    [_button21 setTitle:@"Unity" forState:UIControlStateNormal];
    _button21.backgroundColor = [UIColor whiteColor];
    [_aView addSubview:_button21];
    
    _button22 = [UIButton buttonWithType:UIButtonTypeRoundedRect];
    _button22.alpha = 0.4;
    _button22.frame = CGRectMake(265, 305, 100, 45);
    [_button22 addTarget:self action:@selector(buttonAction:) forControlEvents:UIControlEventTouchUpInside];
    _button22.tintColor = [UIColor blueColor];
    [_button22.titleLabel setFont:[UIFont systemFontOfSize:20]];
    [_button22 setTitle:@"View" forState:UIControlStateNormal];
    _button22.backgroundColor = [UIColor whiteColor];
    [_aView addSubview:_button22];
    
    _button23 = [UIButton buttonWithType:UIButtonTypeRoundedRect];
    _button23.alpha = 0.4;
    _button23.frame = CGRectMake(370, 250, 45, 100);
    [_button23 addTarget:self action:@selector(buttonAction:) forControlEvents:UIControlEventTouchUpInside];
    _button23.tintColor = [UIColor redColor];
    [_button23.titleLabel setFont:[UIFont systemFontOfSize:12]];
    [_button23 setTitle:@"Wave" forState:UIControlStateNormal];
    _button23.backgroundColor = [UIColor whiteColor];
    [_aView addSubview:_button23];
    
    _button24 = [UIButton buttonWithType:UIButtonTypeRoundedRect];
    _button24.alpha = 0.4;
    _button24.frame = CGRectMake(420, 250, 45, 100);
    [_button24 addTarget:self action:@selector(buttonActionNo:) forControlEvents:UIControlEventTouchUpInside];
    _button24.tintColor = [UIColor redColor];
    [_button24.titleLabel setFont:[UIFont systemFontOfSize:12]];
    [_button24 setTitle:@"Xcode" forState:UIControlStateNormal];
    _button24.backgroundColor = [UIColor whiteColor];
    [_aView addSubview:_button24];
    
    
    _button25 = [UIButton buttonWithType:UIButtonTypeRoundedRect];
    _button25.alpha = 0.4;
    _button25.frame = CGRectMake(470, 250, 100, 45);
    [_button25 addTarget:self action:@selector(buttonActionNo:) forControlEvents:UIControlEventTouchUpInside];
    _button25.tintColor = [UIColor redColor];
    [_button25.titleLabel setFont:[UIFont systemFontOfSize:20]];
    [_button25 setTitle:@"Year" forState:UIControlStateNormal];
    _button25.backgroundColor = [UIColor whiteColor];
    [_aView addSubview:_button25];
    
    _button26 = [UIButton buttonWithType:UIButtonTypeRoundedRect];
    _button26.alpha = 0.4;
    _button26.frame = CGRectMake(470, 305, 100, 45);
    [_button26 addTarget:self action:@selector(buttonActionNo:) forControlEvents:UIControlEventTouchUpInside];
    _button26.tintColor = [UIColor greenColor];
    [_button26.titleLabel setFont:[UIFont systemFontOfSize:20]];
    [_button26 setTitle:@"Zoon" forState:UIControlStateNormal];
    _button26.backgroundColor = [UIColor whiteColor];
    [_aView addSubview:_button26];
    
    
    
   
    [self loadWeather];
    
}
-(void)buttonActionNo:(UIButton *)button
{

    UIActionSheet *action = [[UIActionSheet alloc]initWithTitle:@"温馨提示" delegate:self cancelButtonTitle:@"取消" destructiveButtonTitle:@"确定" otherButtonTitles:@"请选择其他品牌", nil];
    action.delegate = self;
    [action showInView:self.scroll1];
    

}


- (void)scrollViewDidScroll:(UIScrollView *)scrollView
{

_aView.frame = CGRectMake(0 + (160 - scrollView.contentOffset.x), 5, 520, 345) ;

}

-(void)buttonAction:(UIButton *)button
{

    Brandsbr1ViewController *vc = [[Brandsbr1ViewController alloc]init];
    _buttonContent = [NSString stringWithFormat:@"%@",button.currentTitle
                     ];
    vc.getcontent = [_buttonContent substringToIndex:1];
    
    [self.navigationController pushViewController:vc animated:YES];
    
    
}

-(NSInteger )tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{


    return 8;

}

-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{

    if (indexPath.row == 0) {
        UITableViewCell *cell = [[UITableViewCell alloc]initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:nil];
        cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
        
        return cell;
    }
    
    UITableViewCell *cell = [[UITableViewCell alloc]initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:nil];
    return cell;
}

- (void)loadWeather
{
    //101180301
    
    NSURL *URL =[NSURL URLWithString:@"http://www.weather.com.cn/data/cityinfo/101070201.html"];
    NSError *error;
    NSString *stringFromFileAtURL = [[NSString alloc]
                                     initWithContentsOfURL:URL
                                     encoding:NSUTF8StringEncoding
                                     error:&error];
    NSString *strTempL;
    NSString *strTempH;
    NSString *strWeather;
    NSString *fileName=@"晴.png";
    if(stringFromFileAtURL !=nil)
    {
        
        NSLog(stringFromFileAtURL);
        NSArray *strarray = [stringFromFileAtURL componentsSeparatedByString:@"\""];
        
        for(int i=0;i<strarray.count;i++)
        {
            NSLog([strarray objectAtIndex:i]);
            NSString *str = [strarray objectAtIndex:i];
            if(YES == [str isEqualToString:@"temp1"])//最高温度
            {
                strTempH = [strarray objectAtIndex:i+2];
            }
            else if(YES == [str isEqualToString:@"temp2"])//最低温度
            {
                strTempL = [strarray objectAtIndex:i+2];
            }
            else if(YES == [str isEqualToString:@"weather"])//天气
            {
                strWeather = [strarray objectAtIndex:i+2];
            }
            
        }
        
        
        NSString *sweather = [[NSString alloc]initWithFormat:@"景区天气:%@\n%@~%@",strWeather,strTempL,strTempH];
        
        
        if(NSNotFound != [strWeather rangeOfString:@"晴"].location)
        {
            fileName =[[NSString alloc]initWithFormat:@"%@",@"晴.png"];
        }
        if(NSNotFound != [strWeather rangeOfString:@"多云"].location)
        {
            fileName =[[NSString alloc]initWithFormat:@"%@", @"多云.png"];
        }
        if(NSNotFound != [strWeather rangeOfString:@"阴"].location)
        {
            fileName =[[NSString alloc]initWithFormat:@"%@", @"阴.png"];
        }
        if(NSNotFound != [strWeather rangeOfString:@"雨"].location)
        {
            fileName =[[NSString alloc]initWithFormat:@"%@", @"中雨.png"];
        }
        if(NSNotFound != [strWeather rangeOfString:@"雪"].location)
        {
            fileName =[[NSString alloc]initWithFormat:@"%@", @"小雪.png"];
        }
        if(NSNotFound != [strWeather rangeOfString:@"雷"].location)
        {
            fileName =[[NSString alloc]initWithFormat:@"%@", @"雷雨.png"];
        }
        if(NSNotFound != [strWeather rangeOfString:@"雾"].location)
        {
            fileName =[[NSString alloc]initWithFormat:@"%@", @"雾.png"];
        }
        if(NSNotFound != [strWeather rangeOfString:@"大雪"].location)
        {
            fileName =[[NSString alloc]initWithFormat:@"%@", @"大雪.png"];
        }
        if(NSNotFound != [strWeather rangeOfString:@"大雨"].location)
        {
            fileName =[[NSString alloc]initWithFormat:@"%@", @"大雨.png"];
        }
        if(NSNotFound != [strWeather rangeOfString:@"中雪"].location)
        {
            fileName = [[NSString alloc]initWithFormat:@"%@",@"中雪.png"];
        }
        if(NSNotFound != [strWeather rangeOfString:@"中雨"].location)
        {
            fileName = [[NSString alloc]initWithFormat:@"%@",@"中雨.png"];
        }
        if(NSNotFound != [strWeather rangeOfString:@"小雪"].location)
        {
            fileName = [[NSString alloc]initWithFormat:@"%@",@"小雪.png"];
        }
        if(NSNotFound != [strWeather rangeOfString:@"小雨"].location)
        {
            fileName = [[NSString alloc]initWithFormat:@"%@",@"中雨.png"];
        }
        if(NSNotFound != [strWeather rangeOfString:@"雨加雪"].location)
        {
            fileName =[[NSString alloc]initWithFormat:@"%@", @"雨夹雪.png"];
        }
        if(NSNotFound != [strWeather rangeOfString:@"阵雨"].location)
        {
            fileName =[[NSString alloc]initWithFormat:@"%@", @"中雨.png"];
        }
        if(NSNotFound != [strWeather rangeOfString:@"雷阵雨"].location)
        {
            fileName =[[NSString alloc]initWithFormat:@"%@", @"雷阵雨.png"];
        }
        if(NSNotFound != [strWeather rangeOfString:@"大雨转晴"].location)
        {
            fileName =[[NSString alloc]initWithFormat:@"%@", @"大雨转晴.png"];
        }
        if(NSNotFound != [strWeather rangeOfString:@"阴转晴"].location)
        {
            fileName =[[NSString alloc]initWithFormat:@"%@", @"阴转晴.png"];
        }
        
        if(sweather !=nil)
            self.weathText.text = sweather;
    }
    NSLog(fileName);
    self.weathImage.image = [UIImage imageNamed:fileName];
    
    
    _aView2 = [[UIView alloc]initWithFrame:CGRectMake(20, 40, 120, 250)];
    _aView2.backgroundColor = [UIColor clearColor];
    //_aView2.alpha = 0.1;
    [_scroll1 addSubview:_aView2];
    _buttonContent1 = [UIButton buttonWithType:UIButtonTypeRoundedRect];
    _buttonContent1.backgroundColor = [UIColor clearColor];
    //_buttonContent1.alpha = 0.9;
    [_buttonContent1 setBackgroundImage:[UIImage imageNamed:fileName] forState:UIControlStateNormal];
    _buttonContent1.frame = CGRectMake(0, 0, 120, 150);
    [_aView2 addSubview:_buttonContent1];
    
    _lableweather1 = [[UILabel alloc]initWithFrame:CGRectMake(0, 150, 120, 40)];
    _lableweather1.backgroundColor = [UIColor clearColor];
    _lableweather1.text = [NSString stringWithFormat:@"大连 %@",strWeather];
    _lableweather1.textColor = [UIColor cyanColor];
    [_aView2 addSubview:_lableweather1];
    
    _lableweather2 = [[UILabel alloc]initWithFrame:CGRectMake(0, 190, 50, 30)];
    _lableweather2.backgroundColor = [UIColor clearColor];
    _lableweather2.text = [NSString stringWithFormat:@"高:%@",strTempH];
    _lableweather2.textColor = [UIColor redColor];
    [_lableweather2 setFont:[UIFont systemFontOfSize:12]];
    [_aView2 addSubview:_lableweather2];
    
    _lableweather3 = [[UILabel alloc]initWithFrame:CGRectMake(50, 190, 50, 30)];
    _lableweather3.backgroundColor = [UIColor clearColor];
    _lableweather3.text =[NSString stringWithFormat:@"低:%@", strTempL];
    [_lableweather3 setFont:[UIFont systemFontOfSize:12]];
    _lableweather3.textColor = [UIColor yellowColor];
    [_aView2 addSubview:_lableweather3];

    [fileName release];
}

- (void)didReceiveMemoryWarning
{
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender
{
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
